/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.sistema_comercial.dominio;

import com.sistema_comercial.util.persistencia.ObjetoPersistenteImpl;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Fabio
 */
@Entity
@Table(name = "comtb_consumidor")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Consumidor.findAll", query = "SELECT c FROM Consumidor c"),
    @NamedQuery(name = "Consumidor.findByInNumeroconsumidor", query = "SELECT c FROM Consumidor c WHERE c.inNumeroconsumidor = :inNumeroconsumidor"),
    @NamedQuery(name = "Consumidor.findByChTipoconsumidor", query = "SELECT c FROM Consumidor c WHERE c.chTipoconsumidor = :chTipoconsumidor"),
    @NamedQuery(name = "Consumidor.findByChNomeconsumidor", query = "SELECT c FROM Consumidor c WHERE c.chNomeconsumidor = :chNomeconsumidor"),
    @NamedQuery(name = "Consumidor.findByChSexo", query = "SELECT c FROM Consumidor c WHERE c.chSexo = :chSexo"),
    @NamedQuery(name = "Consumidor.findByChEstadocivil", query = "SELECT c FROM Consumidor c WHERE c.chEstadocivil = :chEstadocivil"),
    @NamedQuery(name = "Consumidor.findByChInscricaomunicipal", query = "SELECT c FROM Consumidor c WHERE c.chInscricaomunicipal = :chInscricaomunicipal"),
    @NamedQuery(name = "Consumidor.findByChInscricaoestadual", query = "SELECT c FROM Consumidor c WHERE c.chInscricaoestadual = :chInscricaoestadual"),
    @NamedQuery(name = "Consumidor.findByChInscricaofederal", query = "SELECT c FROM Consumidor c WHERE c.chInscricaofederal = :chInscricaofederal"),
    @NamedQuery(name = "Consumidor.findByChLogradouro", query = "SELECT c FROM Consumidor c WHERE c.chLogradouro = :chLogradouro"),
    @NamedQuery(name = "Consumidor.findByChBairro", query = "SELECT c FROM Consumidor c WHERE c.chBairro = :chBairro"),
    @NamedQuery(name = "Consumidor.findByChCidade", query = "SELECT c FROM Consumidor c WHERE c.chCidade = :chCidade"),
    @NamedQuery(name = "Consumidor.findByChUf", query = "SELECT c FROM Consumidor c WHERE c.chUf = :chUf"),
    @NamedQuery(name = "Consumidor.findByChCep", query = "SELECT c FROM Consumidor c WHERE c.chCep = :chCep"),
    @NamedQuery(name = "Consumidor.findByChTelefoneresidencial", query = "SELECT c FROM Consumidor c WHERE c.chTelefoneresidencial = :chTelefoneresidencial"),
    @NamedQuery(name = "Consumidor.findByChTelefonecomercial", query = "SELECT c FROM Consumidor c WHERE c.chTelefonecomercial = :chTelefonecomercial"),
    @NamedQuery(name = "Consumidor.findByChTelefonecelular", query = "SELECT c FROM Consumidor c WHERE c.chTelefonecelular = :chTelefonecelular"),
    @NamedQuery(name = "Consumidor.findByChEmail", query = "SELECT c FROM Consumidor c WHERE c.chEmail = :chEmail")})
public class Consumidor extends ObjetoPersistenteImpl{
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @NotNull
    @Column(name = "IN_NUMEROCONSUMIDOR")
    private Long inNumeroconsumidor;
    @Column(name = "CH_TIPOCONSUMIDOR")
    private Character chTipoconsumidor;
    @Size(max = 60)
    @Column(name = "CH_NOMECONSUMIDOR")
    private String chNomeconsumidor;
    @Column(name = "CH_SEXO")
    private Character chSexo;
    @Size(max = 10)
    @Column(name = "CH_ESTADOCIVIL")
    private String chEstadocivil;
    @Size(max = 14)
    @Column(name = "CH_INSCRICAOMUNICIPAL")
    private String chInscricaomunicipal;
    @Size(max = 14)
    @Column(name = "CH_INSCRICAOESTADUAL")
    private String chInscricaoestadual;
    @Size(max = 14)
    @Column(name = "CH_INSCRICAOFEDERAL")
    private String chInscricaofederal;
    @Size(max = 50)
    @Column(name = "CH_LOGRADOURO")
    private String chLogradouro;
    @Size(max = 50)
    @Column(name = "CH_BAIRRO")
    private String chBairro;
    @Size(max = 50)
    @Column(name = "CH_CIDADE")
    private String chCidade;
    @Size(max = 2)
    @Column(name = "CH_UF")
    private String chUf;
    @Size(max = 8)
    @Column(name = "CH_CEP")
    private String chCep;
    @Size(max = 14)
    @Column(name = "CH_TELEFONERESIDENCIAL")
    private String chTelefoneresidencial;
    @Size(max = 14)
    @Column(name = "CH_TELEFONECOMERCIAL")
    private String chTelefonecomercial;
    @Size(max = 14)
    @Column(name = "CH_TELEFONECELULAR")
    private String chTelefonecelular;
    @Size(max = 50)
    @Column(name = "CH_EMAIL")
    private String chEmail;

    public Consumidor() {
    }

    public Consumidor(Long inNumeroconsumidor) {
        this.inNumeroconsumidor = inNumeroconsumidor;
    }

    public Long getInNumeroconsumidor() {
        return inNumeroconsumidor;
    }

    public void setInNumeroconsumidor(Long inNumeroconsumidor) {
        this.inNumeroconsumidor = inNumeroconsumidor;
    }

    public Character getChTipoconsumidor() {
        return chTipoconsumidor;
    }

    public void setChTipoconsumidor(Character chTipoconsumidor) {
        this.chTipoconsumidor = chTipoconsumidor;
    }

    public String getChNomeconsumidor() {
        return chNomeconsumidor;
    }

    public void setChNomeconsumidor(String chNomeconsumidor) {
        this.chNomeconsumidor = chNomeconsumidor;
    }

    public Character getChSexo() {
        return chSexo;
    }

    public void setChSexo(Character chSexo) {
        this.chSexo = chSexo;
    }

    public String getChEstadocivil() {
        return chEstadocivil;
    }

    public void setChEstadocivil(String chEstadocivil) {
        this.chEstadocivil = chEstadocivil;
    }

    public String getChInscricaomunicipal() {
        return chInscricaomunicipal;
    }

    public void setChInscricaomunicipal(String chInscricaomunicipal) {
        this.chInscricaomunicipal = chInscricaomunicipal;
    }

    public String getChInscricaoestadual() {
        return chInscricaoestadual;
    }

    public void setChInscricaoestadual(String chInscricaoestadual) {
        this.chInscricaoestadual = chInscricaoestadual;
    }

    public String getChInscricaofederal() {
        return chInscricaofederal;
    }

    public void setChInscricaofederal(String chInscricaofederal) {
        this.chInscricaofederal = chInscricaofederal;
    }

    public String getChLogradouro() {
        return chLogradouro;
    }

    public void setChLogradouro(String chLogradouro) {
        this.chLogradouro = chLogradouro;
    }

    public String getChBairro() {
        return chBairro;
    }

    public void setChBairro(String chBairro) {
        this.chBairro = chBairro;
    }

    public String getChCidade() {
        return chCidade;
    }

    public void setChCidade(String chCidade) {
        this.chCidade = chCidade;
    }

    public String getChUf() {
        return chUf;
    }

    public void setChUf(String chUf) {
        this.chUf = chUf;
    }

    public String getChCep() {
        return chCep;
    }

    public void setChCep(String chCep) {
        this.chCep = chCep;
    }

    public String getChTelefoneresidencial() {
        return chTelefoneresidencial;
    }

    public void setChTelefoneresidencial(String chTelefoneresidencial) {
        this.chTelefoneresidencial = chTelefoneresidencial;
    }

    public String getChTelefonecomercial() {
        return chTelefonecomercial;
    }

    public void setChTelefonecomercial(String chTelefonecomercial) {
        this.chTelefonecomercial = chTelefonecomercial;
    }

    public String getChTelefonecelular() {
        return chTelefonecelular;
    }

    public void setChTelefonecelular(String chTelefonecelular) {
        this.chTelefonecelular = chTelefonecelular;
    }

    public String getChEmail() {
        return chEmail;
    }

    public void setChEmail(String chEmail) {
        this.chEmail = chEmail;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (inNumeroconsumidor != null ? inNumeroconsumidor.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Consumidor)) {
            return false;
        }
        Consumidor other = (Consumidor) object;
        if ((this.inNumeroconsumidor == null && other.inNumeroconsumidor != null) || (this.inNumeroconsumidor != null && !this.inNumeroconsumidor.equals(other.inNumeroconsumidor))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.sistema_comercial.dominio.Consumidor[ inNumeroconsumidor=" + inNumeroconsumidor + " ]";
    }
    
}
